<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ColorController
 *
 * @author QuangKhoi
 */
class ColorController {
    //put your code here
    public $model;
    
    public $view;
    
    public function __construct($model, $view) {
        $this->model = $model;
        $this->view = $view;
        
        
    }
    
    public function render($color, $page = 1, $date = '', $length = 12) {
        $position = ($page - 1) * $length;
        $statuses = Status::getByColors($color, $position, $length);
        $this->view->length = $length;
        $this->view->type = $type;
        $this->view->page = $page;
        $this->view->date = $date;
        $this->view->color = $color;
        $this->view->model = $this->model;
        $this->view->statuses = $statuses;
        $masterView = MasterView::getInstance();
        $masterView->view = $this->view;
        $masterView->error = $error;
    }
}

?>
